public class Dome {
    public static void main(String[] args) {
        Thread t1 = new Thread(()->{
           SingletonHungry singletonHungry = SingletonHungry.getInstance();
           System.out.println("线程t1饿汉模式："+singletonHungry);
           SingletLazy singletLazy = SingletLazy.getInstance();
           System.out.println("线程t1懒汉模式："+singletLazy);
        });
        Thread t2 = new Thread(()->{
            SingletonHungry singletonHungry = SingletonHungry.getInstance();
            System.out.println("线程t2饿汉模式："+singletonHungry);
            SingletLazy singletLazy = SingletLazy.getInstance();
            System.out.println("线程t2懒汉模式："+singletLazy);
        });
        Thread t3 = new Thread(()->{
            SingletonHungry singletonHungry = SingletonHungry.getInstance();
            System.out.println("线程t3饿汉模式："+singletonHungry);
            SingletLazy singletLazy = SingletLazy.getInstance();
            System.out.println("线程t3懒汉模式："+singletLazy);
        });
        Thread t4 = new Thread(()->{
            SingletonHungry singletonHungry = SingletonHungry.getInstance();
            System.out.println("线程t4饿汉模式："+singletonHungry);
            SingletLazy singletLazy = SingletLazy.getInstance();
            System.out.println("线程t4懒汉模式："+singletLazy);
        });
        Thread t5 = new Thread(()->{
            SingletonHungry singletonHungry = SingletonHungry.getInstance();
            System.out.println("线程t5饿汉模式："+singletonHungry);
            SingletLazy singletLazy = SingletLazy.getInstance();
            System.out.println("线程t5懒汉模式："+singletLazy);
        });
        t1.start();
        t2.start();
        t3.start();
        t4.start();
        t5.start();
    }
}
